#!/bin/bash

basepath=$(cd `dirname $0`; pwd)
cd $basepath

# openssl genrsa -out server.key 2048
# openssl req -new -key server.key -out server.csr -config openssl.cnf
# openssl x509 -req -days 1095 -in server.csr -signkey server.key -out server.crt -extfile openssl.cnf -extensions v3_req

openssl genpkey -algorithm RSA -out private.key
openssl req -x509 -new -key private.key -days 1095 -out certificate.pem -config openssl.cnf -extensions v3_req
